'\" te
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH POOL_COMPONENT_TO_ELEM 3POOL "Sep 23, 2003"
.SH NAME
pool_component_to_elem, pool_to_elem, pool_conf_to_elem, pool_resource_to_elem
\- resource pool element-related functions
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\|.\|. ]
#include <pool.h>

\fBpool_elem_t *\fR\fBpool_component_to_elem\fR(\fBpool_conf_t *\fR\fIconf\fR,
     \fBpool_component_t *\fR\fIcomponent\fR);
.fi

.LP
.nf
\fBpool_elem_t *\fR\fBpool_conf_to_elem\fR(\fBpool_conf_t *\fR\fIconf\fR);
.fi

.LP
.nf
\fBpool_elem_t *\fR\fBpool_resource_to_elem\fR(\fBpool_conf_t *\fR\fIconf\fR
      \fBpool_resource_t *\fR\fIresource\fR);
.fi

.LP
.nf
\fBpool_elem_t *\fR\fBpool_to_elem\fR(\fBpool_conf_t *\fR\fIconf\fR, \fBpool_t *\fR\fIpool\fR);
.fi

.SH DESCRIPTION
.sp
.LP
A pool element, as represented by a \fBpool_elem_t\fR, is a common abstraction
for any \fBlibpool\fR entity that contains properties. All such types can be
converted to the opaque \fBpool_elem_t\fR type using the appropriate conversion
functions prototyped above. The \fIconf\fR argument for each function refers to
the target configuration to which the operation applies.
.SH RETURN VALUES
.sp
.LP
Upon successful completion, these functions return a \fBpool_elem_t\fR
corresponding to the argument passed in. Otherwise they return \fINULL\fR and
\fBpool_error\fR(3POOL) returns the pool-specific error value.
.SH ERRORS
.sp
.LP
These function will fail if:
.sp
.ne 2
.na
\fB\fBPOE_BADPARAM\fR\fR
.ad
.RS 16n
The supplied configuration's status is not \fBPOF_VALID\fR.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	Unstable
_
MT-Level	Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR libpool (3LIB),
.BR pool_error (3POOL),
.BR attributes (7)
